home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-serious-
/
programming
/
basic
/
purebasic_demo
/
purebasic
/
compilers
/
purebasic.asm
< prev
next >
Wrap
Assembly Source File
|
2000-02-28
|
88KB
|
3,307 lines
;
; PureBasic Demo V1.30 generated code
;
; © 2000 Fantaisie Software
;
MOVEM.l d0-d7/a0-a6,-(a7)
;
; CreateBank()
;
MOVEQ #34,d0
JSR _PB_AllocVec
MOVE.l d0,a4
;
; OpenAmigaLibs()
;
MOVE.l a6,6(a4)
LEA.l _GraphicsName(pc),a1
MOVEQ #0,d0
JSR -552(a6)
MOVE.l d0,10(a4)
LEA.l _IntuitionName(pc),a1
MOVEQ #0,d0
JSR -552(a6)
MOVE.l d0,14(a4)
LEA.l _DosName(pc),a1
MOVEQ #0,d0
JSR -552(a6)
MOVE.l d0,18(a4)
BRA _ALib_Suite
_IntuitionName
dc.b "intuition.library",0
_DosName
dc.b "dos.library",0
_GraphicsName
dc.b "graphics.library",0,0
_ALib_Suite
;
; InitPBLibBank()
;
LEA.l _PBLibBank,a0
MOVE.l a0,d1
LEA.l _PBLibBankOffset(pc),a0
MOVE.l #3,d0
MOVE.l a4,a1
ADD.l #22,a1
_PBLibLoop
MOVE.l (a0)+,(a1)
ADD.l d1,(a1)+
SUBQ #1,d0
BNE _PBLibLoop
BRA _PBLibNext
_PBLibBankOffset
dc.l 160
dc.l 242
dc.l 586
_PBLibNext
;
; InitString()
;
MOVE.l #5000,d0
JSR _PB_AllocVec
MOVE.l d0,a3
MOVE.l d0,-(a7)
MOVEQ #0,d0
MOVEQ #40,d1
MOVE.l d1,d2
MOVE.l $4,a6
JSR -696(a6)
MOVE.l d0,(a4)
;
; ***********************************
;
; Screen example file for PureBasic
;
; © 1999 - Fantaisie Software -
;
; ***********************************
;
;
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S1,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf1
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S2,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S3,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S4,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S5,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S6,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S7,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S8,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf2
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf2
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S9,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S10,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf3
; PrintN("Workbench screen found !")
LEA.l _S11,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S12,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S13,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf4
_EndIf3
; PrintN("Workbench screen isn't found ?!")
LEA.l _S14,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf4
; EndIf
_EndIf1
; PrintN("Press the mouse to quit")
LEA.l _S15,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S16,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf5
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S17,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S18,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S19,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S20,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S21,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S22,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S23,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf6
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf6
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S24,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S25,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf7
; PrintN("Workbench screen found !")
LEA.l _S26,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S27,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S28,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf8
_EndIf7
; PrintN("Workbench screen isn't found ?!")
LEA.l _S29,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf8
; EndIf
_EndIf5
; PrintN("Press the mouse to quit")
LEA.l _S30,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S31,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf9
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S32,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S33,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S34,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S35,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S36,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S37,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S38,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf10
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf10
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S39,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S40,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf11
; PrintN("Workbench screen found !")
LEA.l _S41,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S42,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S43,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf12
_EndIf11
; PrintN("Workbench screen isn't found ?!")
LEA.l _S44,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf12
; EndIf
_EndIf9
; PrintN("Press the mouse to quit")
LEA.l _S45,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S46,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf13
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S47,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S48,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S49,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S50,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S51,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S52,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S53,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf14
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf14
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S54,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S55,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf15
; PrintN("Workbench screen found !")
LEA.l _S56,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S57,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S58,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf16
_EndIf15
; PrintN("Workbench screen isn't found ?!")
LEA.l _S59,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf16
; EndIf
_EndIf13
; PrintN("Press the mouse to quit")
LEA.l _S60,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S61,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf17
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S62,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S63,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S64,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S65,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S66,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S67,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S68,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf18
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf18
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S69,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S70,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf19
; PrintN("Workbench screen found !")
LEA.l _S71,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S72,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S73,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf20
_EndIf19
; PrintN("Workbench screen isn't found ?!")
LEA.l _S74,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf20
; EndIf
_EndIf17
; PrintN("Press the mouse to quit")
LEA.l _S75,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S76,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf21
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S77,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S78,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S79,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S80,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S81,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S82,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S83,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf22
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf22
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S84,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S85,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf23
; PrintN("Workbench screen found !")
LEA.l _S86,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S87,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S88,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf24
_EndIf23
; PrintN("Workbench screen isn't found ?!")
LEA.l _S89,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf24
; EndIf
_EndIf21
; PrintN("Press the mouse to quit")
LEA.l _S90,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S91,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf25
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S92,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S93,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S94,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S95,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S96,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S97,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S98,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf26
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf26
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S99,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S100,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf27
; PrintN("Workbench screen found !")
LEA.l _S101,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S102,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S103,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf28
_EndIf27
; PrintN("Workbench screen isn't found ?!")
LEA.l _S104,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf28
; EndIf
_EndIf25
; PrintN("Press the mouse to quit")
LEA.l _S105,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S106,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf29
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S107,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S108,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S109,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S110,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S111,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S112,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S113,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf30
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf30
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S114,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S115,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf31
; PrintN("Workbench screen found !")
LEA.l _S116,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S117,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S118,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf32
_EndIf31
; PrintN("Workbench screen isn't found ?!")
LEA.l _S119,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf32
; EndIf
_EndIf29
; PrintN("Press the mouse to quit")
LEA.l _S120,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S121,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf33
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S122,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S123,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S124,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S125,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S126,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S127,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S128,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf34
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf34
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S129,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S130,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf35
; PrintN("Workbench screen found !")
LEA.l _S131,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S132,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S133,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf36
_EndIf35
; PrintN("Workbench screen isn't found ?!")
LEA.l _S134,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf36
; EndIf
_EndIf33
; PrintN("Press the mouse to quit")
LEA.l _S135,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S136,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf37
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S137,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S138,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S139,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S140,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S141,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S142,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S143,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf38
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf38
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S144,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S145,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf39
; PrintN("Workbench screen found !")
LEA.l _S146,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S147,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S148,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf40
_EndIf39
; PrintN("Workbench screen isn't found ?!")
LEA.l _S149,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf40
; EndIf
_EndIf37
; PrintN("Press the mouse to quit")
LEA.l _S150,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
JMP _PB_EOP
; InitScreen(1) ; We will need 2 screens
MOVEQ #1,d0
MOVE.l 6(a4),a6
MOVE.l 30(a4),a5
JSR -252(a5)
; If FindScreen(0,"") ; Find de default public screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S151,a0
MOVEQ #0,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf41
; Print("Screen address: ") : PrintNumberN(ScreenID())
LEA.l _S152,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -70(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; HideScreen() ; Hide it
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -258(a5)
; Delay(10) ; Wait a little bit...
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; ShowScreen() ; and show it !
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -20(a5)
; PrintN("Screen dimensions: "+Str(ScreenWidth())+"x"+Str(ScreenHeight())+"x"+Str(ScreenDepth()))
LEA.l _S153,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -30(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S154,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -80(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S155,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -90(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; PrintN("MouseX: "+Str(ScreenMouseX())+", MouseY: "+Str(ScreenMouseY())+", ScreenBar height: "+Str(ScreenBarHeight()))
LEA.l _S156,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -66(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S157,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -56(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
LEA.l _S158,a0
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -100(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; If OpenScreen(1,320,200,3,0) ; Open a new screen, 320*200 - 8 colours
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w #320,d1
EXT.l d1
MOVE.w #200,d2
EXT.l d2
MOVEQ #3,d3
MOVEQ #0,d4
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -184(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf42
; Delay(50)
MOVEQ #50,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; CloseScreen(1)
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -344(a5)
; EndIf
_EndIf42
; UseScreen(0)
MOVEQ #0,d0
MOVE.l 30(a4),a5
JSR -14(a5)
; a = ObtainBestPen(255,255,255,0) ; Get the index of the pure white colour and lock it
MOVE.w #255,d1
EXT.l d1
MOVE.w #255,d2
EXT.l d2
MOVEQ #0,d3
MOVE.w #255,d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -228(a5)
MOVE.w d0,4(a4)
; PrintN("Pure White colour found at colour: "+Str(a))
LEA.l _S159,a0
MOVE.l a3,-(a7)
JSR PB_CopyString
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 26(a4),a5
JSR -82(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l (a7)+,a3
MOVE.l a3,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; ReleasePen(a) ; Release it to the system
MOVE.w 4(a4),d0
EXT.l d0
MOVE.l 10(a4),a6
MOVE.l 30(a4),a5
JSR -110(a5)
; If FindScreen(1,"Workbench") ; Find the WB Screen
MOVEM.l d1-d7/a0-a2,-(a7)
LEA.l _S160,a0
MOVEQ #1,d0
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -340(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
TST.l d0
BEQ _EndIf43
; PrintN("Workbench screen found !")
LEA.l _S161,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Print("Screen RastPort: ") : PrintNumber(ScreenRastPort())
LEA.l _S162,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -46(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -94(a5)
; Print(", Screen ViewPort: ") : PrintNumberN(ScreenViewPort())
LEA.l _S163,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -138(a5)
MOVEM.l d1-d7/a0-a2,-(a7)
MOVE.l 30(a4),a5
JSR -38(a5)
MOVEM.l (a7)+,d1-d7/a0-a2
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -54(a5)
; Delay(10) ; Flash the workbench screen !
MOVEQ #10,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -160(a5)
; FlashScreen()
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -296(a5)
; Else
JMP _EndIf44
_EndIf43
; PrintN("Workbench screen isn't found ?!")
LEA.l _S164,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; Endif
_EndIf44
; EndIf
_EndIf41
; PrintN("Press the mouse to quit")
LEA.l _S165,a0
MOVE.l a0,d1
MOVE.l 18(a4),a6
MOVE.l 22(a4),a5
JSR -122(a5)
; MouseWait()
MOVE.l 10(a4),a6
MOVE.l 22(a4),a5
JSR -156(a5)
; End
_PB_EOP
;
; CallEndFuncs()
;
MOVE.l 6(a4),d5
MOVE.l 14(a4),a6
MOVE.l 30(a4),a5
JSR -290(a5)
;
; FreeStrings()
;
MOVE.l (a7)+,a1
JSR _PB_FreeVec
MOVE.l (a4),a0
MOVEA.l $4,a6
JSR -702(a6)
;
; CloseAmigaLibs()
;
MOVE.l 6(a4),a6
MOVE.l 10(a4),a1
JSR -414(a6)
MOVE.l 14(a4),a1
JSR -414(a6)
MOVE.l 18(a4),a1
JSR -414(a6)
;
; RemoveBank()
;
MOVE.l a4,a1
JSR -690(a6)
;
; End Of Program
;
MOVEM.l (a7)+,d0-d7/a0-a6
RTS
;
_PB_AllocVec
MOVE.l #65536,d1
MOVE.l $4,a6
JMP -684(a6)
;
_PB_FreeVec
MOVE.l $4,a6
JMP -690(a6)
;
PB_AllocString
MOVE.l $4,a6
MOVE.l a0,d2
TST.l (a5)
BEQ _Skip_Free
MOVE.l (a5),a1
MOVE.l a1,a0
_PB_GetSize
MOVE.b (a0)+,d0
BNE _PB_GetSize
SUB.l a1,a0
MOVE.l a0,d0
MOVE.l (a4),a0
JSR -714(a6)
_Skip_Free
MOVE.l a3,d0
SUB.l d2,d0
ADDQ.l #1,d0
MOVE.l (a4),a0
JSR -708(a6)
MOVE.l d0,a0
MOVE.l d0,(a5)
MOVE.l d2,a1
_PB_CopyLoop
MOVE.b (a1)+,(a0)+
BNE _PB_CopyLoop
MOVE.l d2,a3
RTS
;
PB_CopyString
CMP.l #0,a0
BEQ _PB_CopyStringEnd
_PB_CopyStringLoop
MOVE.b (a0)+,(a3)+
BNE _PB_CopyStringLoop
SUB.l #1,a3
_PB_CopyStringEnd
RTS
;
_S1
dc.b "",0
_S2
dc.b "Screen address: ",0
_S3
dc.b "Screen dimensions: ",0
_S4
dc.b "x",0
_S5
dc.b "x",0
_S6
dc.b "MouseX: ",0
_S7
dc.b ", MouseY: ",0
_S8
dc.b ", ScreenBar height: ",0
_S9
dc.b "Pure White colour found at colour: ",0
_S10
dc.b "Workbench",0
_S11
dc.b "Workbench screen found !",0
_S12
dc.b "Screen RastPort: ",0
_S13
dc.b ", Screen ViewPort: ",0
_S14
dc.b "Workbench screen isn't found ?!",0
_S15
dc.b "Press the mouse to quit",0
_S16
dc.b "",0
_S17
dc.b "Screen address: ",0
_S18
dc.b "Screen dimensions: ",0
_S19
dc.b "x",0
_S20
dc.b "x",0
_S21
dc.b "MouseX: ",0
_S22
dc.b ", MouseY: ",0
_S23
dc.b ", ScreenBar height: ",0
_S24
dc.b "Pure White colour found at colour: ",0
_S25
dc.b "Workbench",0
_S26
dc.b "Workbench screen found !",0
_S27
dc.b "Screen RastPort: ",0
_S28
dc.b ", Screen ViewPort: ",0
_S29
dc.b "Workbench screen isn't found ?!",0
_S30
dc.b "Press the mouse to quit",0
_S31
dc.b "",0
_S32
dc.b "Screen address: ",0
_S33
dc.b "Screen dimensions: ",0
_S34
dc.b "x",0
_S35
dc.b "x",0
_S36
dc.b "MouseX: ",0
_S37
dc.b ", MouseY: ",0
_S38
dc.b ", ScreenBar height: ",0
_S39
dc.b "Pure White colour found at colour: ",0
_S40
dc.b "Workbench",0
_S41
dc.b "Workbench screen found !",0
_S42
dc.b "Screen RastPort: ",0
_S43
dc.b ", Screen ViewPort: ",0
_S44
dc.b "Workbench screen isn't found ?!",0
_S45
dc.b "Press the mouse to quit",0
_S46
dc.b "",0
_S47
dc.b "Screen address: ",0
_S48
dc.b "Screen dimensions: ",0
_S49
dc.b "x",0
_S50
dc.b "x",0
_S51
dc.b "MouseX: ",0
_S52
dc.b ", MouseY: ",0
_S53
dc.b ", ScreenBar height: ",0
_S54
dc.b "Pure White colour found at colour: ",0
_S55
dc.b "Workbench",0
_S56
dc.b "Workbench screen found !",0
_S57
dc.b "Screen RastPort: ",0
_S58
dc.b ", Screen ViewPort: ",0
_S59
dc.b "Workbench screen isn't found ?!",0
_S60
dc.b "Press the mouse to quit",0
_S61
dc.b "",0
_S62
dc.b "Screen address: ",0
_S63
dc.b "Screen dimensions: ",0
_S64
dc.b "x",0
_S65
dc.b "x",0
_S66
dc.b "MouseX: ",0
_S67
dc.b ", MouseY: ",0
_S68
dc.b ", ScreenBar height: ",0
_S69
dc.b "Pure White colour found at colour: ",0
_S70
dc.b "Workbench",0
_S71
dc.b "Workbench screen found !",0
_S72
dc.b "Screen RastPort: ",0
_S73
dc.b ", Screen ViewPort: ",0
_S74
dc.b "Workbench screen isn't found ?!",0
_S75
dc.b "Press the mouse to quit",0
_S76
dc.b "",0
_S77
dc.b "Screen address: ",0
_S78
dc.b "Screen dimensions: ",0
_S79
dc.b "x",0
_S80
dc.b "x",0
_S81
dc.b "MouseX: ",0
_S82
dc.b ", MouseY: ",0
_S83
dc.b ", ScreenBar height: ",0
_S84
dc.b "Pure White colour found at colour: ",0
_S85
dc.b "Workbench",0
_S86
dc.b "Workbench screen found !",0
_S87
dc.b "Screen RastPort: ",0
_S88
dc.b ", Screen ViewPort: ",0
_S89
dc.b "Workbench screen isn't found ?!",0
_S90
dc.b "Press the mouse to quit",0
_S91
dc.b "",0
_S92
dc.b "Screen address: ",0
_S93
dc.b "Screen dimensions: ",0
_S94
dc.b "x",0
_S95
dc.b "x",0
_S96
dc.b "MouseX: ",0
_S97
dc.b ", MouseY: ",0
_S98
dc.b ", ScreenBar height: ",0
_S99
dc.b "Pure White colour found at colour: ",0
_S100
dc.b "Workbench",0
_S101
dc.b "Workbench screen found !",0
_S102
dc.b "Screen RastPort: ",0
_S103
dc.b ", Screen ViewPort: ",0
_S104
dc.b "Workbench screen isn't found ?!",0
_S105
dc.b "Press the mouse to quit",0
_S106
dc.b "",0
_S107
dc.b "Screen address: ",0
_S108
dc.b "Screen dimensions: ",0
_S109
dc.b "x",0
_S110
dc.b "x",0
_S111
dc.b "MouseX: ",0
_S112
dc.b ", MouseY: ",0
_S113
dc.b ", ScreenBar height: ",0
_S114
dc.b "Pure White colour found at colour: ",0
_S115
dc.b "Workbench",0
_S116
dc.b "Workbench screen found !",0
_S117
dc.b "Screen RastPort: ",0
_S118
dc.b ", Screen ViewPort: ",0
_S119
dc.b "Workbench screen isn't found ?!",0
_S120
dc.b "Press the mouse to quit",0
_S121
dc.b "",0
_S122
dc.b "Screen address: ",0
_S123
dc.b "Screen dimensions: ",0
_S124
dc.b "x",0
_S125
dc.b "x",0
_S126
dc.b "MouseX: ",0
_S127
dc.b ", MouseY: ",0
_S128
dc.b ", ScreenBar height: ",0
_S129
dc.b "Pure White colour found at colour: ",0
_S130
dc.b "Workbench",0
_S131
dc.b "Workbench screen found !",0
_S132
dc.b "Screen RastPort: ",0
_S133
dc.b ", Screen ViewPort: ",0
_S134
dc.b "Workbench screen isn't found ?!",0
_S135
dc.b "Press the mouse to quit",0
_S136
dc.b "",0
_S137
dc.b "Screen address: ",0
_S138
dc.b "Screen dimensions: ",0
_S139
dc.b "x",0
_S140
dc.b "x",0
_S141
dc.b "MouseX: ",0
_S142
dc.b ", MouseY: ",0
_S143
dc.b ", ScreenBar height: ",0
_S144
dc.b "Pure White colour found at colour: ",0
_S145
dc.b "Workbench",0
_S146
dc.b "Workbench screen found !",0
_S147
dc.b "Screen RastPort: ",0
_S148
dc.b ", Screen ViewPort: ",0
_S149
dc.b "Workbench screen isn't found ?!",0
_S150
dc.b "Press the mouse to quit",0
_S151
dc.b "",0
_S152
dc.b "Screen address: ",0
_S153
dc.b "Screen dimensions: ",0
_S154
dc.b "x",0
_S155
dc.b "x",0
_S156
dc.b "MouseX: ",0
_S157
dc.b ", MouseY: ",0
_S158
dc.b ", ScreenBar height: ",0
_S159
dc.b "Pure White colour found at colour: ",0
_S160
dc.b "Workbench",0
_S161
dc.b "Workbench screen found !",0
_S162
dc.b "Screen RastPort: ",0
_S163
dc.b ", Screen ViewPort: ",0
_S164
dc.b "Workbench screen isn't found ?!",0
_S165
dc.b "Press the mouse to quit",0
;
PB_NullString
dc.b 0
Even
;
_PBLibBank
INCBIN "PureBasic:Compilers/ExecutableLib"